package com.connection;

import java.sql.*;
public class jdbconnection {

	Connection connection;
	Statement statement;
	
	public jdbconnection() {
		try {
			
				Class.forName("com.mysql.jdbc.Driver");
			}
	
	catch(ClassNotFoundException e) {
		e.printStackTrace();
	}
	}
	public Statement jdbConnection()
	{
		try {
			connection= DriverManager.getConnection("jdbc:mysql://localhost:3306/hirel","root","root");
		} catch (SQLException e) {
			
			e.printStackTrace();
			
		}
		
		try {
			statement =connection.createStatement(ResultSet.CONCUR_READ_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return statement;
	}
		
	}
	
